package com.itheima.demo.my_set;

import java.util.TreeSet;

public class TreeSetDemo {//TreeSet自然比较
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();
        ts.add(new Student("a",18));
        ts.add(new Student("b",17));
        ts.add(new Student("b",18));
        ts.add(new Student("a",20));

        System.out.println(ts);
    }
}
